
<html><head><title>Customize Blog statistics Widget</title>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<style type="text/css">

body {
  margin: 0 auto;
  padding: 0;
  text-align: center;
  background-color: #efefef;
}

#outer-wrapper {
  font-family: Verdana, Arial;
}

#header-wrapper {
 margin: 0;
  padding: 0;
  background-color: #528bc5;
}

#header {
  width: 96%;
  margin: 0 auto;
  background-color: #336699;
  color: #ffffff;
}

#header h1 {
  padding-top: 18px;
  padding-bottom: 0px;
  text-align: left;
  margin: 0 14px .1em;
  line-height: 1.2em;
}

#header .description {
  margin: 0 14px;
  padding: 0 0 10px;
  line-height: 1.4em;
  text-align: left;
  font-size: 90%;
}

#content-wrapper {
  width: 96%;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-top: 0;
}

#content-wrapper h2 {
 margin: 1.6em 0 .5em;
 padding: 4px 5px;
 background-color: #ffd595;
 font-size: 100%;
 color: #333333;
}

#content-wrapper .instructions {
  font-size: 90%;
  text-align: left;
}

#footer {
  padding-top: 10px;
  text-color: #333333;
  font-size: 80%;}

</style>

<script language="javascript">
var options = "";
function customize() {
  // Get input values
	var blogurl = document.getElementsByName("iblogurl")[0].value;
if(blogurl.substring(0,7)=="http://")blogurl=blogurl.substring(7,blogurl.length);
if(blogurl[blogurl.length-1]=="/")blogurl=blogurl.substring(0,blogurl.length-1);

        
  // Generate widgetcode
        var txtarea = document.getElementsByTagName("textarea")[0];

txtarea.value = "\<script style=\"text/javascript\"\>function numposts(json) { document.write('Total Posts :' \+ json.feed.openSearch$totalResults.$t \+ '\<br\>')\; }function numcomments(json) { document.write('Total Comments :' \+ json.feed.openSearch$totalResults.$t \+ '\<br\>')\; }\</script\>\n";
txtarea.value = txtarea.value +"\<script src=\"http://"+blogurl+"/feeds/posts/default?alt=json-in-script&callback=numposts\"\>\</script\>\n";
txtarea.value = txtarea.value +"\<script src=\"http://"+blogurl+"/feeds/comments/default?alt=json-in-script&callback=numcomments\"\>\</script\>\n";


txtarea.value = txtarea.value + "\<a href='http://www.trollvl.com'\>\<img alt='Blogger Widgets' style='border: 0' src='http://trollvlhcv.googlecode.com/svn/trunk/icontrollvl/blogger-widgets.png'/\>\</a\>";
txtarea.value = txtarea.value + "\<a href='http://www.trollvl.com/2012/12/blog-statistics-widget-for-blogger.html'\>\<img style='border: 0' alt='Blog statistics Widget For Blogger' src='http://trollvlhcv.googlecode.com/svn/trunk/icontrollvl/blogger-widgets.png'/\>\</a\>";


   // Show add button
      var addbutton = document.getElementsByName("go")[0];
      addbutton.disabled = false;
}

function defaultvalues() {
	document.getElementsByName("widget.title")[0].value = "Blog Statistics";
        document.getElementsByName("iblogurl")[0].value = "www.trollvl.com";
	document.getElementsByName("inumcomments")[0].value = "5";
        document.getElementsByName("ishowdate")[0].checked = true;
        document.getElementsByName("ishowtitle")[0].checked = true;
        document.getElementsByName("inumchars")[0].value = "100";
        document.getElementsByName("style")[0].checked = true;
        document.getElementsByName("style")[1].checked = false;
        document.getElementsByName("go")[0].disabled = true;
}	

</script></head><body>

  <div id="outer-wrapper">
    
    <div id="content-wrapper">
       <h2>Tạo Thống Kê Blog</h2>
<form method="post" action="http://www.blogger.com/add-widget" target="_blank">
<fieldset style="padding: 5px 10px; width: 430px;"><legend align="top">Widget 
Title</legend>
<div style="text-align: left; font-size: 85%;"><span style="width: 160px;">
	Widget Title</span>: 
	<input size="30" name="widget.title" value="Thống Kê" type="text"><br></div>
</fieldset><br>
<fieldset style="padding: 5px 10px; width: 430px;"><legend align="top">Customize 
Widget</legend><div style="text-align: left; font-size: 85%;">
<span style="width: 160px;">Blog url</span>: http:// 
<input size="40" name="iblogurl" value="www.trollvl.com" type="text">/<br><br>

</div>
</fieldset><br>
<input value="Áp Dụng" onclick="javascript:customize();" type="button">
<input value="Reset" onclick="javascript:defaultvalues();" type="button">
<input disabled="disabled" name="go" value="Thêm Vào Blog" type="submit">
<br><br>
<textarea name="widget.content" style="display: none;"></textarea>
</form>
    </div>
  </div>

</body></html>
</object></layer></span></div></table></body></html>